`timescale 1ns / 1ps

module IM(
    input [31:0] addr,
    output [31:0] instr
    );

    reg [31:0] word[0:4095];

	wire [31:0] taddr = addr-32'h0000_3000;	

    assign instr = word[taddr[13:2]];

    initial begin
        $readmemh("code.txt", word);
        $readmemh("code_handler.txt", word, 1120, 2047);
    end 

endmodule
